/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aiaudio.database.tables;

import aiaudio.processing.base.mapreduce.CoordinateDoubleValueKey;
import aiaudio.processing.prediction.top.TopRatingList;
import aiaudio.database.Family;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.util.Bytes;

/**
 *
 * @author nastya
 */
public class RecommendationListTable extends TableStructure{

    public static final Family RATING = new Family("r");
    public static final Family ARTIST = new Family("a");
    
    @Override
    public Family[] getAllFamilies() {
        return new Family[]{RATING, ARTIST};
    }
    
    public static void addRecommendation(Put put, int num, byte[] artist, Double calculatedRating){
        put.add(RATING.getNameAsBytes(), Bytes.toBytes(num), UNMODIFIABLE_TIMESTAMP, Bytes.toBytes(calculatedRating));
        put.add(ARTIST.getNameAsBytes(), Bytes.toBytes(num), UNMODIFIABLE_TIMESTAMP, artist);
    }
    
}
